TALKz COMPATIBLEz READBORDERz _qxb0ytjhc Geneva _qxb0ytjhc dbf-to-html Geneva @ 7.417,39.333 GET m.fpck2 PICTURE "@&N3" FROM field_ar RANGE 1 SIZE 7.000,25.000 DEFAULT 1 FONT "Geneva", 10 Select the field for F the hyperlink display: Geneva Geneva @*HT2 O.K. Geneva @*HN2 Cancel Enter the html field F delimiter character(s): Geneva Geneva @ 7.417,3.333 GET m.fpck1 PICTURE "@&N3" FROM field_ar RANGE 1 SIZE 7.000,25.000 DEFAULT 1 FONT "Geneva", 10 Select the field for F html file names: Geneva K7I0@ Geneva This Part Geneva Geneva @3KK HTML file extension: Geneva Copyright 1995 Andrew Warner awarner@cais.com Geneva Geneva _qxb0ytjhc SET READBORDER &rborder CURRAREA TALKSTAT COMPSTAT RBORDER _QXB0YTJHCQUIT B0YTJHCQUITBTN _QXB0YTU9BDELIM T_QXB0YTUSAEXT __QXB0YTV9V {Ctrl-A} {Ctrl-A} _QXB0YTU9B _QXB0YTUSA _QXB0YTV9V TALKz COMPATIBLEz READBORDERz _qxb0yu188 Geneva _qxb0yu188 Select a database file: Geneva @ 2.917,3.333 GET dbfpick PICTURE "@&N3" FROM dbfs SIZE 7.000,17.500 DEFAULT 1 FONT "Geneva", 10 Geneva @*HT2 O.K. Geneva @*HN2 Cancel _qxb0yu188 SET READBORDER &rborder CURRAREA TALKSTAT COMPSTAT RBORDER _QXB0YU188OK1 0YU188QUITBTN _QXB0YU3GS _QXB0YU3GS do awerror WITH ERROR(), MESSAGE(), MESSAGE(1), PROGRAM(), LINENO() talkz safetyz defaultzF foxtools code2 Select an html source file .HTML Wrong file type. Please choose an HTML, HTM, or TXT file. Please choose an HTML, HTM, or TXT file file. or press Escape to quit Pick a database Cancelled screens\pickdbf.spr screens\SELECT.SPR temp.prg temp.fxp temp.prg OLDTALK acOLDSAFE ngOLDDEF ,,)PATH ct suIS_FOXTOOLQUIT (,) FFOXTOOLS h pictuCODE2 (expCODE typPRE UMEMO xpC) POST > uppIS_HTML IsFILE_NAME FXALERT OLFILE_HANDLHTMLSTR HANDLDBFS = DBC t equal X Not mDBFPICK >=SCREENS tFIELD_AR cLENGTH .FPCK1 .F.FPCK2 NOT EXT al notDELIM gicaFILENAME oLINKNAME IPRG_OUT n MYPRG LEF_FXP reF_PRG leteN FOXTOOLSF Error!F Sorry an error occured.... Error number Line number of error: Program name: Andrew Warner awarner@sysplan.com 703 351-8298 MERROR acMESS ngMESS1 ,,)MPROG t suMLINENO OLIS_FOXTOOLAWERROR pre 333 post 149 *datapath = SUBSTR(SYS(16),1,RAT("\",SYS(16))) + "html_output\" htmlpath=path+"html_output\" && path variable set in calling program set textmerge delimiters to (m.delim) set textmerge on indexStr="" ***************** ********************* Begin SCAN of dbf ************************* ***************** GO TOP SCAN * get rid of "the " in school name... * REDUCE() is a a foxtools.mlb (MAC) function; it gets rid of extra spaces... * no big deal if you don't have foxtools.mlb field=ALLTRIM(&fieldname) fullfield=field && need full field contents for < a href= > fullfield IF is_foxtools field=IIF(UPPER(LEFT(LTRIM(REDUCE(field)),4))="THE ",substr(field,5),field) field=IIF(UPPER(LEFT(LTRIM(field),4))="THE ",substr(field,5),field) ENDIF * chrtran() gets rid of spaces - Webstar 2.2 doesn't like spaces in file names... * LEFT(field,20) limits file name to 25 chracters... * add ".html" extension to so we can use school as file name: field=chrtran(LEFT(field,m.length)," ","")+".html" field=chrtran(field( * path + file name: file_name = htmlpath+field * get a file handle for low level file io: _TEXT=FCREATE(file_name) IF _TEXT < 0 DO problem with (_TEXT) ENDIF * This will be used to create an html * index file for all the html created: indexStr= indexStr+""+ALLTRIM(fullfield)+"
"+chr(13) TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t..... @*HT2 GENDTEXT &&---------- ...AND ABOVE THIS LINE =FCLOSE(_TEXT) IF .F. && couldn't get this to work type="TEXT" creator="ttxt" fx=FxSetType((file_name),type,creator) IF fx != 0 wait window "Error trying to set file typr and creator" ENDIF *Syntax: FxSetType(, , ) ENDIF ENDSCAN *************** ********************* End SCAN of dbf ************************* *************** * create index.html file file_name = htmlpath+"index.html" handle=FCREATE(file_name) =FWRITE(handle,indexStr) =FCLOSE(handle) PROCEDURE problem PARAMETER file_handle * check for successful file create: IF file_handle < 0 DO CASE CASE FERROR() =4 reason ="too many files open" CASE FERROR() =5 reason ="Acces denied" CASE FERROR() =8 reason ="out of memory" CASE FERROR() =29 reason ="Disk Full" CASE FERROR() =31 reason ="General Failure" ENDCASE WAIT WINDOW " PROBLEM : no "+ reason ENDIF RETURN Pick a database: Geneva *datapath = SUBSTR(SYS(16),1,RAT("\",SYS(16))) + "html_output\" htmlpath=path+"html_output\" && path variable set in calling program set textmerge delimiters to (m.delim) set textmerge on indexStr="" ***************** ********************* Begin SCAN of dbf ************************* ***************** GO TOP SCAN * get rid of "the " in school name... * REDUCE() is a a foxtools.mlb (MAC) function; it gets rid of extra spaces... * no big deal if you don't have foxtools.mlb field=ALLTRIM(&fieldname) fullfield=field && need full field contents for < a href= > fullfield IF is_foxtools field=IIF(UPPER(LEFT(LTRIM(REDUCE(field)),4))="THE ",substr(field,5),field) field=IIF(UPPER(LEFT(LTRIM(field),4))="THE ",substr(field,5),field) ENDIF * chrtran() gets rid of spaces - Webstar 2.2 doesn't like spaces in file names... * LEFT(field,20) limits file name to 25 chracters... * add ".html" extension to so we can use school as file name: field=chrtran(LEFT(field,m.length)," ","")+".html" field=chrtran(field, chr(39) ,"") * path + file name: file_name = htmlpath+field * get a file handle for low level file io: _TEXT=FCREATE(file_name) IF _TEXT < 0 DO problem with (_TEXT) ENDIF * This will be used to create an html * index file for all the html created: indexStr= indexStr+""+ALLTRIM(fullfield)+"
"+chr(13) TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t..... the curriculum in 1995 is an Academic Resource Center and th v*datapath = SUBSTR(SYS(16),1,RAT("\",SYS(16))) + "html_output\" * this code mess is copyright 1995 by Andrew Warner htmlpath=path+"html_output\" && path variable set in calling program set textmerge delimiters to (m.delim) set textmerge on indexStr="" ***************** ********************* Begin SCAN of dbf ************************* ***************** GO TOP SCAN * get rid of "the " in school name... * REDUCE() is a a foxtools.mlb (MAC) function; it gets rid of extra spaces... * no big deal if you don't have foxtools.mlb field=ALLTRIM(&fieldname) fullfield=field && need full field contents for < a href= > fullfield IF is_foxtools field=iif(upper(left(ltrim(reduce(field)),4))="THE ",substr(field,5),field) field=iif(upper(left(ltrim(field),4))="THE ",substr(field,5),field) ENDIF * chrtran() gets rid of spaces - Webstar 2.2 doesn't like spaces in file names... * LEFT(field,20) limits file name to 25 chracters... * add ".html" extension to so we can use school as file name: field=chrtran(LEFT(field,m.length)," ","") && filter out spaces field=chrtran(field,"'." ,"")+".html" && filter out periods and single quotes * path + file name: file_name = htmlpath+field * get a file handle for low level file io: _TEXT=FCREATE(file_name) IF _TEXT < 0 DO problem with (_TEXT) ENDIF * This will be used to create an html * index file for all the html created: indexStr= indexStr+""+ALLTRIM(fullfield)+"
"+chr(13) TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t..... {ENDTEXT &&---------- ...AND ABOVE THIS LINE *this code mess is copyright 1995 by Andrew Warner =FCLOSE(_TEXT) IF .F. && couldn't get this to work type="TEXT" creator="ttxt" fx=FxSetType((file_name),type,creator) IF fx != 0 wait window "Error trying to set file typr and creator" ENDIF *Syntax: FxSetType(, , ) ENDIF ENDSCAN *************** ********************* End SCAN of dbf ************************* *************** * create index.html file file_name = htmlpath+"index.html" handle=FCREATE(file_name) =FWRITE(handle,indexStr) =FCLOSE(handle) PROCEDURE problem PARAMETER file_handle * check for successful file create: IF file_handle < 0 DO CASE CASE FERROR() =4 reason ="too many files open" CASE FERROR() =5 reason ="Acces denied" CASE FERROR() =8 reason ="out of memory" CASE FERROR() =29 reason ="Disk Full" CASE FERROR() =31 reason ="General Failure" ENDCASE WAIT WINDOW " PROBLEM : no "+ reason ENDIF RETURN * htmlMaker, by Andrew Warner. Copyright 1995 by Andrew Warner, all rights reserved. * This code is copyright 1995 by Andrew Warner, all rights reserved. * Code2.memo *datapath = SUBSTR(SYS(16),1,RAT("\",SYS(16))) + "html_output\" * this code mess is copyright 1995 by Andrew Warner htmlpath=path+"html_output\" && path variable set in calling program set textmerge delimiters to (m.delim) set textmerge on indexStr="" ***************** ********************* Begin SCAN of dbf ************************* ***************** GO TOP SCAN * get rid of "the " in school name... * REDUCE() is a a foxtools.mlb (MAC) function; it gets rid of extra spaces... * no big deal if you don't have foxtools.mlb field=ALLTRIM(&fieldname) fullfield=field && need full field contents for < a href= > fullfield IF is_foxtools field=iif(upper(left(ltrim(reduce(field)),4))="THE ",substr(field,5),field) field=iif(upper(left(ltrim(field),4))="THE ",substr(field,5),field) ENDIF * chrtran() gets rid of spaces - Webstar 2.2 doesn't like spaces in file names... * LEFT(field,20) limits file name to 25 chracters... * add ".html" extension to so we can use school as file name: field=chrtran(LEFT(field,m.length)," ","") && filter out spaces field=chrtran(field,"'." ,"")+".html" && filter out periods and single quotes * path + file name: file_name = htmlpath+field * get a file handle for low level file io: _TEXT=FCREATE(file_name) IF _TEXT < 0 DO problem with (_TEXT) ENDIF * This will be used to create an html * index file for all the html created: indexStr= indexStr+""+ALLTRIM(fullfield)+"
"+chr(13) TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t..... $ENDTEXT &&---------- ...AND ABOVE THIS LINE Nothing can go above this line * htmlMaker, by Andrew Warner. Copyright 1995 by Andrew Warner, all rights reserved. * This code is copyright 1995 by Andrew Warner, all rights reserved. * Code2.memo =FCLOSE(_TEXT) IF .F. && couldn't get this to work type="TEXT" creator="ttxt" fx=FxSetType((file_name),type,creator) IF fx != 0 wait window "Error trying to set file typr and creator" ENDIF *Syntax: FxSetType(, , ) ENDIF ENDSCAN *************** ********************* End SCAN of dbf ************************* *************** * create index.html file file_name = htmlpath+"index.html" handle=FCREATE(file_name) =FWRITE(handle,indexStr) =FCLOSE(handle) PROCEDURE problem PARAMETER file_handle * check for successful file create: IF file_handle < 0 DO CASE CASE FERROR() =4 reason ="too many files open" CASE FERROR() =5 reason ="Acces denied" CASE FERROR() =8 reason ="out of memory" CASE FERROR() =29 reason ="Disk Full" CASE FERROR() =31 reason ="General Failure" ENDCASE WAIT WINDOW " PROBLEM : "+ reason ENDIF RETURNRN+ reason ENDIF RETURNon and ecology. We offer small classes, structure, and indi * htmlMaker, by Andrew Warner. Copyright 1995 by Andrew Warner, all rights reserved. * This code is copyright 1995 by Andrew Warner, all rights reserved. * Code2.memo *datapath = SUBSTR(SYS(16),1,RAT("\",SYS(16))) + "html_output\" * this code mess is copyright 1995 by Andrew Warner htmlpath=path+"html_output\" && path variable set in calling program set textmerge delimiters to (m.delim) set textmerge on indexStr="" ***************** ********************* Begin SCAN of dbf ************************* ***************** GO TOP SCAN * get rid of "the " in school name... * REDUCE() is a a foxtools.mlb (MAC) function; it gets rid of extra spaces... * no big deal if you don't have foxtools.mlb field=ALLTRIM(&fieldname) fullfield=field && need full field contents for < a href= > fullfield IF is_foxtools field=iif(upper(left(ltrim(reduce(field)),4))="THE ",substr(field,5),field) field=iif(upper(left(ltrim(field),4))="THE ",substr(field,5),field) ENDIF * chrtran() gets rid of spaces - Webstar 2.2 doesn't like spaces in file names... * LEFT(field,20) limits file name to 25 chracters... * add ".html" extension to so we can use school as file name: *field=chrtran( left(field,m.length ) ," ","") && filter out spaces field=chrtran( iif ( ! empty(m.length), left(field,val(m.length) ) ," ","") && filter out spaces field=chrtran(field,"'." ,"")+".html" && filter out periods and single quotes * path + file name: file_name = htmlpath+field * get a file handle for low level file io: _TEXT=FCREATE(file_name) IF _TEXT < 0 DO problem with (_TEXT) ENDIF * This will be used to create an html * index file for all the html created: indexStr= indexStr+""+ALLTRIM(fullfield)+"
"+chr(13) TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t..... isk Full * htmlMaker, by Andrew Warner. Copyright 1995 by Andrew Warner, all rights reserved. * This code is copyright 1995 by Andrew Warner, all rights reserved. * Code2.memo *datapath = SUBSTR(SYS(16),1,RAT("\",SYS(16))) + "output\" * this code mess is copyright 1995 by Andrew Warner htmlpath=path+"output\" && path variable set in calling program set textmerge delimiters to (m.delim) set textmerge on indexStr="" ***************** ********************* Begin SCAN of dbf ************************* ***************** GO TOP SCAN * get rid of "the " in school name... * REDUCE() is a a foxtools.mlb (MAC) function; it gets rid of extra spaces... * no big deal if you don't have foxtools.mlb field=ALLTRIM(&fieldname) fullfield=field && need full field contents for < a href= > fullfield IF is_foxtools field=iif(upper(left(ltrim(reduce(field)),4))="THE ",substr(field,5),field) field=iif(upper(left(ltrim(field),4))="THE ",substr(field,5),field) ENDIF * chrtran() gets rid of spaces - Webstar 2.2 doesn't like spaces in file names... * LEFT(field,20) limits file name to 25 chracters... * add ".html" extension to so we can use school as file name: *field=chrtran( left(field,m.length ) ," ","") && filter out spaces field= iif ( ! empty(m.length), left(field,val(m.length)), field) field=chrtran( field ," ","") && filter out spaces field=chrtran(field,"'" ,"")+".html" && filter out single quotes * path + file name: file_name = htmlpath+field * get a file handle for low level file io: _TEXT=FCREATE(file_name) IF _TEXT < 0 DO problem with (_TEXT) ENDIF * This will be used to create an html * index file for all the html created: indexStr= indexStr+""+ALLTRIM(fullfield)+"
"+chr(13) TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t..... E t..... TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t..... * htmlMaker, by Andrew Warner. Copyright 1995 by Andrew Warner, all rights reserved. * This code is copyright 1995 by Andrew Warner, all rights reserved. * Code2.memo *datapath = SUBSTR(SYS(16),1,RAT("\",SYS(16))) + "output\" * this code mess is copyright 1995 by Andrew Warner htmlpath=path+"output\" && path variable set in calling program set textmerge delimiters to (m.delim) set textmerge on indexStr="" *filename=alltrim(field_ar[m.fpck1,1]) *linkname=alltrim(field_ar[m.fpck2,1]) ***************** ********************* Begin SCAN of dbf ************************* ***************** GO TOP SCAN * get rid of "the " in school name... * REDUCE() is a a foxtools.mlb (MAC) function; it gets rid of extra spaces... * no big deal if you don't have foxtools.mlb linkname=ALLTRIM(&linkname) && need full field contents for < a href= > linkname *IF is_foxtools * field=iif(upper(left(ltrim(reduce(field)),4))="THE ",substr(field,5),field) *ELSE * field=iif(upper(left(ltrim(field),4))="THE ",substr(field,5),field) *ENDIF * chrtran() gets rid of spaces - Webstar 2.2 doesn't like spaces in file names... * LEFT(field,20) limits file name to 25 chracters... * add ".html" extension to so we can use school as file name: *field=chrtran( left(field,m.length ) ," ","") && filter out spaces field= iif ( ! empty(m.length), left(field,val(m.length)), field) field=chrtran( field ," ","") && filter out spaces field=chrtran(field,"'" ,"")+".html" && filter out single quotes * path + file name: file_name = htmlpath+field * get a file handle for low level file io: _TEXT=FCREATE(file_name) IF _TEXT < 0 DO problem with (_TEXT) ENDIF * This will be used to create an html * index file for all the html created: indexStr= indexStr+""+ALLTRIM(fullfield)+"
"+chr(13) TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t..... * htmlMaker, by Andrew Warner. Copyright 1995 by Andrew Warner, all rights reserved. * This code is copyright 1995 by Andrew Warner, all rights reserved. * Code2.memo *datapath = SUBSTR(SYS(16),1,RAT("\",SYS(16))) + "output\" * this code mess is copyright 1995 by Andrew Warner htmlpath=path+"output\" && path variable set in calling program set textmerge delimiters to (m.delim) set textmerge on indexStr="" *filename=alltrim(field_ar[m.fpck1,1]) *linkname=alltrim(field_ar[m.fpck2,1]) ***************** ********************* Begin SCAN of dbf ************************* ***************** GO TOP set step on SCAN * get rid of "the " in school name... * REDUCE() is a a foxtools.mlb (MAC) function; it gets rid of extra spaces... * no big deal if you don't have foxtools.mlb linkname=&linkname && need full field contents for < a href= > linkname *IF is_foxtools * field=iif(upper(left(ltrim(reduce(field)),4))="THE ",substr(field,5),field) *ELSE * field=iif(upper(left(ltrim(field),4))="THE ",substr(field,5),field) *ENDIF * chrtran() gets rid of spaces - Webstar 2.2 doesn't like spaces in file names... * LEFT(field,20) limits file name to 25 chracters... * add ".html" extension to so we can use school as file name: *field=chrtran( left(field,m.length ) ," ","") && filter out spaces filename=&filename filename= iif ( ! empty(m.length), left(filename,val(m.length)), field) filename=chrtran( filename ," ","") && filter out spaces filename=chrtran(field,"'" ,"")+".html" && filter out single quotes * path + file name: filename= htmlpath+filename * get a file handle for low level file io: _TEXT=FCREATE(filename) IF _TEXT < 0 DO problem with (_TEXT) ENDIF * This will be used to create an html * index file for all the html created: indexStr= indexStr+""+linkname+"
"+chr(13) TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t..... The company is an authorized Florian * htmlMaker, by Andrew Warner. Copyright 1995 by Andrew Warner, all rights reserved. * This code is copyright 1995 by Andrew Warner, all rights reserved. * Code2.memo *datapath = SUBSTR(SYS(16),1,RAT("\",SYS(16))) + "output\" * this code mess is copyright 1995 by Andrew Warner htmlpath=path+"output\" && path variable set in calling program set textmerge delimiters to (m.delim) set textmerge on indexStr="" *filename=alltrim(field_ar[m.fpck1,1]) *linkname=alltrim(field_ar[m.fpck2,1]) ***************** ********************* Begin SCAN of dbf ************************* ***************** GO TOP SCAN * get rid of "the " in school name... * REDUCE() is a a foxtools.mlb (MAC) function; it gets rid of extra spaces... * no big deal if you don't have foxtools.mlb link=&linkname link=alltrim(link) file=&filename file=chrtran(file,"' " ,"")+m.ext && filter out single quotes and spaces * path + file name: filewrite= htmlpath+file * get a file handle for low level file io: _TEXT=FCREATE(filewrite) IF _TEXT < 0 DO problem with (_TEXT) ENDIF * This will be used to create an html * index file for all the html created: indexStr= indexStr+""+link+"
"+LF TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t..... ..... ") && filter out spaces file=&filename *filename= iif ( ! empty(m.length), left(filename,val(m.length)), field) *filename=chrtran( filename ," ","") && filter out spaces file=chrtran(file,"' " ,"")+m.ext && filter out single quotes and spaces * path + file name: filewrite= htmlpath+file * get a file handle for low level file io: _TEXT=FCREATE(filewrite) IF _TEXT < 0 DO problem with (_TEXT) ENDIF * This will be used to create an html * index file for all the html created: indexStr= indexStr+""+link+"
"+chr(13) TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t..... BELOW THIS LINE t..... and incorporated in 1984. The company employs * htmlMaker, by Andrew Warner. Copyright 1995 by Andrew Warner, all rights reserved. * This code is copyright 1995 by Andrew Warner, all rights reserved. * Code2.memo *datapath = SUBSTR(SYS(16),1,RAT("\",SYS(16))) + "output\" * this code mess is copyright 1995 by Andrew Warner htmlpath=path+"output\" && path variable set in calling program set textmerge delimiters to (m.delim) set textmerge on indexStr="" *filename=alltrim(field_ar[m.fpck1,1]) *linkname=alltrim(field_ar[m.fpck2,1]) ***************** ********************* Begin SCAN of dbf ************************* ***************** GO TOP SCAN * get rid of "the " in school name... * REDUCE() is a a foxtools.mlb (MAC) function; it gets rid of extra spaces... * no big deal if you don't have foxtools.mlb link=&linkname link=alltrim(link) file=&filename file=chrtran(file,"' " ,"")+m.ext && filter out single quotes and spaces * path + file name: filewrite= htmlpath+file * get a file handle for low level file io: _TEXT=FCREATE(filewrite) IF _TEXT < 0 DO problem with (_TEXT) ENDIF * This will be used to create an html * index file for all the html created: indexStr= indexStr+""+link+"
"+LF IF mod(recno(),10)=0 WAIT WINDOW NOWAIT "Records processed: "+alltrim(str(recno())) ENDIF TEXT &&-----------ENTER YOUR HTML BELOW THIS LINE t..... c>screens\SELECT.SPR MacintoshHD:\Temporary Items\ SELECT.SPX screens\PICKDBF.SPR PICKDBF.SPX screens\Main.PRG MAIN.FXP MacintoshHD:\Applications\Microsoft FoxPro 2.6\htValerieSRC\code\ code2.DBF code2.FPT